CC=gcc

TARGET=CrcUnitest

ROOT_DIR=$(shell pwd)
INCLUDE_PATH := $(ROOT_DIR)/../../common/include/
LIBRARY_PATH := $(ROOT_DIR)/../../output/
OUTPUT_PATH  := $(ROOT_DIR)/../../output/

LIBS := Common pthread rt

CFLAGS  += $(foreach dir, $(INCLUDE_PATH), -I$(dir))
LDFLAGS += $(foreach lib, $(LIBRARY_PATH), -L$(lib))
LDFLAGS += $(foreach lib, $(LIBS), -l$(lib))

all:
	gcc -o $(OUTPUT_PATH)/${TARGET} ${TARGET}.c ${CFLAGS} ${LDFLAGS}

clean:
	rm -rf $(OUTPUT_PATH)/${TARGET}
